<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="sl" tagdir="/WEB-INF/tags" %>
<%@page import="com.solution.common.config.PublicConfig"%>
<%@page import="com.solution.admin.home.constants.IndexConstants"%>
<%
	String basePath = PublicConfig.ROOT_PATH;
	String imgRootURL = PublicConfig.IMG_ROOT_URL;
%>	
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="format-detection" content="telephone=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<title>调价</title>
<link rel="stylesheet" type="text/css" href="<%=basePath%>/statics_wx/css/style.css">
<script src="<%=basePath%>/statics_wx/js/jquery.min.js"></script>
<script src="<%=basePath%>/statics_wx/js/js.js"></script>
<script type="text/javascript" src="<%=basePath%>/statics_wx/js/custom.js"></script>
<script type="text/javascript" src="<%=basePath%>/statics/plugins/layer/layer.js"></script>
<script type="text/javascript">
//系统域名 
var rootPath = '<%=basePath %>';
// 系统上传文件展示域名
var imgRootURL = '<%=imgRootURL %>';
</script>
<style>
.prd_list1 ul li .box5 .good_info11 .item-info h4 strong{color:#333}
</style>
</head>
<body style="background:#f5f5f5">
<c:set var="rootPath" value="<%=basePath %>"></c:set>
<c:set var="imgRootURL" value="<%=imgRootURL %>"></c:set>

<div class="overlay" id="edit_pricebox" style="display:none">
	<div class="goods_editbox">
    <a href="javascript:void(0);" class="icon_close"></a>
    <div class="goods_editbox_con">
    	<div class="good_info1">
        	<div class="pic">
            	<img id="imagePath" src="" />
            </div>
            <div class="item-info">
            	<h2 id="productName">无</h2>
                <!-- <h4>显示器：19.5WLCD</h4> -->
                <h5 id="productPrice">0.00</h5>
            </div>
        </div>
        <div class="good_info2">
        	
          
        </div>
        <div class="good_info3">
        	<dl>
            	<dt>
                	<strong>调价</strong>
            		<div class="txt1">
                    	<i>
                    		<a id="minus" href="javascript:void(0);" class="current" onclick="adjustPrice('minus')">-</a>
                    		<a id="plus" href="javascript:void(0);" onclick="adjustPrice('plus')">+</a>
                    	</i>
                    	<u>
                    		<input id="adjustPrice" type="text" class="inputstyle1" value="" onblur="changePrice();"/>
                    	</u>
            		</div>
            	</dt>
            	<dt>
                	<strong>数量</strong>
            		<div class="txt1">
                    	<em id="buyNumView">0</em>
                    	<input id="buyNum" type="hidden" value="0"/>
                    </div>
                </dt>
                <dt>
                	<strong>调价后小计</strong>
                    <div class="txt1">
                    	<em id="productItemMoney">￥0.00</em>
                    </div>
                </dt>
            </dl>
        	
        </div>
    </div>
    <div class="bottom">
    	<p>
    		<input type="hidden" id="detailId" value=""/>
        	<input id="btn_submit" type="button" class="inputbtn1" value="确定" />
        </p>
    </div>
    </div>
</div>

<div class="address_part" style="margin-bottom:0.2rem">
		<div class="address_middle">
			<div class="address_box">
				<i></i>
				<div class="address_box_con">
					<h2><strong>${order.customerName }</strong><span>${order.receiverMobile }</span></h2>
					<p>${order.provinceName }${order.cityName }${order.areaName }${order.address }</p>
					<input id="orderCode" type="hidden" value="${order.orderCode }"/>
				</div>
			</div>
		</div>
	</div>
<div class="prd_list1">
	<ul>
		<c:forEach items="${order.productDetail }" var="detail" varStatus="index">
    	<li>
        	<div class="box5">
            	<div class="good_info11">
                	<div class="pic">
                    	<img src="${imgRootURL }/${detail.imagePath}" />
                    </div>
                    <div class="item-info">
                    	<h2>${detail.productName}</h2>
                        <h4>
                        	<strong tagId="${detail.id }" tag="adjustPriceSpan" class="current">
                        		<input type="hidden" name="id" value="${detail.id }"/>
                        		<input type="hidden" tagId="${detail.id }" name="productName" value="${detail.productName }"/>
                        		<input type="hidden" tagId="${detail.id }" name="productPrice" value="${detail.productPrice }"/>
                        		<input type="hidden" tagId="${detail.id }" name="adjustProductPrice" value="${detail.productAdjustPrice }"/>
                        		<input type="hidden" tagId="${detail.id }" name="buyNum" value="${detail.buyNum }"/>
                        		<input type="hidden" tagId="${detail.id }" name="imagePath" value="${detail.imagePath}"/>
                        		<span>
                        			<c:if test="${detail.productPrice eq detail.productAdjustPrice}">
                        				原价
                        				<u>
                        					￥<fmt:formatNumber type="number" value="${empty detail.productPrice ? 0 : detail.productPrice}" pattern="0.00" />
                        				</u>
                        			</c:if>
                        			<c:if test="${detail.productPrice ne detail.productAdjustPrice }">
                        				调价后
                        				<u>
                        					￥<fmt:formatNumber type="number" value="${empty detail.productAdjustPrice ? 0 : detail.productAdjustPrice}" pattern="0.00" />
                        				</u>
                        			</c:if>
                        		</span>
                        		<s></s>
                        	</strong>
                        	<b>x${detail.buyNum }</b>
                        </h4>
                    </div>
                </div>
                <!-- <div class="good_info12">
                	<dl>
                    	<dt>
                        	<strong>赠品</strong>
                            <p><span>U盘+移动电源+签字笔（三件套）</span><em>x1</em></p>
                        </dt>
                    </dl>
                </div> -->
            </div>
        </li>
		</c:forEach>
    </ul>
</div>
<div class="tj_reson">
	<p>
    	<input id="adjustReason" type="text" class="inputstyle1" placeholder="请填写调价原因" />
    </p>
</div>
<div class="prd_info5">
	<dl>
    	<dt>
        	<strong><em></em>运费金额</strong>
            <div class="txt1">
            	<p>
                	<input id="deliveryFeeMoney" type="text" class="inputstyle1" value="${order.deliveryFeeMoney }" placeholder="请输入运费金额" onblur="addDeliveryFeeMoney();"/>
                </p>
            </div>
        </dt>
        <dt>
        	<strong>订单调价</strong>
            <div class="txt1">
            	<p>
                	<input id="orderAdjustPrice" type="text" class="inputstyle1" value=""${order.adjustOrderMoney }" placeholder="请输入订单调价金额" onblur="orderPriceAdjust();"/>
                </p>
            </div>
        </dt>
        <input id="totalProductAdjustMoney" type="hidden" value=""/>
    </dl>
</div>
<div class="prd_info3">
	<div class="prd_info3_con">
    	<dl>
        	<dt>
            	<strong>商品总计</strong>
        		<p>￥
        			<fmt:formatNumber type="number" value="${totalProductMoney == null ? 0 : totalProductMoney}" pattern="0.00" />
        		</p>
        		<input id="totalProductMoney" type="hidden" value="${totalProductMoney == null ? 0 : totalProductMoney}"/>
            </dt>
            <dt>
            	<strong>商品调价总计</strong>
        		<p id="totalProductAdjustMoneyShow">-￥
        			<fmt:formatNumber type="number" value="${totalDiffMoney}" pattern="0.00" />
        		</p>
            </dt>
            <dt>
            	<strong>订单调价</strong>
        		<p id="orderAdjustPriceShow">-￥
        			<fmt:formatNumber type="number" value="${order.adjustOrderMoney}" pattern="0.00" />
        		</p>
            </dt>
            <dd>
            	<strong>调价后应付</strong>
        		<p>
            		￥
            		<em id="realPayMoneyShow"><fmt:formatNumber type="number" value="${order.realPayMoney }" pattern="0.00" /></em>
        		</p>
            </dd>
        </dl>
    	
    </div>
</div>
<div class="footerfixed5"></div>
<div class="ddxq_bottom">
	<p>
    	<a href="javascript:void(0);" id="btn_confirm_adjust_price" class="btn">确定</a>
    </p>
</div>
<script type="text/javascript" src="<%=basePath%>/js/wx/order/order_adjust_price.js"></script>
</body>
</html>